<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>学期信息管理</title>
	<meta name="decorator" content="default" />
	<script type="text/javascript">
        function page(n, s) {
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            $("#searchForm").submit();
            return false;
        }

	</script>
</head>
<body>
<ul class="nav nav-tabs">
	<li class="active"><a href="${ctx}/business/semester/">学期信息列表</a></li>
	<shiro:hasPermission name="business:semester:edit">
		<li><a href="${ctx}/business/semester/form?sort=10">学期信息添加</a></li>
	</shiro:hasPermission>
</ul>
<form:form id="searchForm" modelAttribute="semester"
		   action="${ctx}/business/semester/" method="post" class="breadcrumb form-search">
	<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}" />
	<input id="pageSize" name="pageSize" type="hidden"
		   value="${page.pageSize}" />
	<label>名称  ：</label>
	<form:input path="id" htmlEscape="false" maxlength="50"
				class="input-medium" />
	&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit"
	value="查询" />

</form:form>
<tags:message content="${message}" />
<table id="contentTable" class="table table-striped table-bordered table-condensed">
	<thead>
	<tr>
			<th>ID</th>
			<th>班次</th>
			<th>类型</th>
			<th>是否招生</th>
			<th>报读人数</th>
			<th>备注</th>
		<shiro:hasPermission name="business:semester:edit">
			<th>操作</th>
		</shiro:hasPermission>
	</tr>
	</thead>
	<tbody>
	<c:forEach items="${page.list}" var="semester">
		<tr id="${semester.id}">
				<td><a href="${ctx}/business/semester/form?id=${semester.id}">${semester.id}</a></td>
				<td>${semester.number}</td>
			<td>${dic:getLabelByValue(semester.formal, 'semester_formal')}</td>
			<td>${dic:getLabelByValue(semester.enroll, 'semester_enroll')}</td>
				<td>${semester.total}</td>
				<td>${semester.remarks}</td>
			<shiro:hasPermission name="business:semester:edit">
				<td><a href="${ctx}/business/semester/form?id=${semester.id}">修改</a>
					<a href="${ctx}/business/semester/delete?id=${semester.id}"
					   onclick="return confirmx('确认要删除该字典吗？', this.href)">删除</a>
				</td>
			</shiro:hasPermission>
		</tr>
	</c:forEach>
	</tbody>
</table>
<div class="pagination">${page}</div>
</body>
</html>